using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Collections;
using System.Collections.Generic;
namespace Kunlun.Models
{
    [Table("Order")]
      public class Order
      {
         [Key]  
         [DisplayName("订单ID")] 
         public string Oid { get; set; }
         [Required(ErrorMessage = "用户ID不能空")]  
         [DisplayName("用户ID")] 
         public int UserID { get; set; }
         [Required(ErrorMessage = "订单状态(1,未确认;2,已确认;3,已完成;4,已取消;)不能空")]  
         [DisplayName("订单状态(1,未确认;2,已确认;3,已完成;4,已取消;)")] 
         public int Status { get; set; }
         [Required(ErrorMessage = "生成时间不能空")]  
         [DisplayName("生成时间")] 
         public DateTime BeginDate { get; set; }
         [Required(ErrorMessage = "收获地址ID不能空")]  
         [DisplayName("收获地址ID")] 
         public int AddressID { get; set; }
         [Required(ErrorMessage = "支付方式ID不能空")]  
         [DisplayName("支付方式ID")] 
         public int Paymethodid { get; set; }
         [Required(ErrorMessage = "配送方式不能空")]  
         [DisplayName("配送方式")] 
         public int SendType { get; set; }
         [DisplayName("订单产品价格")] 
         public decimal Price { get; set; }
         [DisplayName("配送费用")] 
         public decimal Sendprice { get; set; }
         [DisplayName("订单是否完成")] 
         public bool IsEnd { get; set; }
         [DisplayName("抵扣积分")] 
         public int Scored { get; set; }
         [DisplayName("赠送积分")] 
         public int Scoring { get; set; }
         [DisplayName("详细地址")] 
         public string AddressInfo { get; set; }
         [DisplayName("联系电话")] 
         public string Connections { get; set; }
         [DisplayName("订单备注")] 
         public string Remark { get; set; }
         [DisplayName("管理员ID")] 
         public int Mid { get; set; }
         [DisplayName("下单IP")] 
         public string BeginIP { get; set; }
         [DisplayName("选择的模板")] 
         public int Templete { get; set; }
         [DisplayName("快递单号")] 
         public string ExpressNum { get; set; }
         [DisplayName("订单结束时间")] 
         public DateTime LastUpdateTime { get; set; }
         public string Invoice { get; set; }
         [DisplayName("实际支付金额")] 
         public decimal PayMoney { get; set; }
        [ForeignKey("OrderID")]
         public virtual ICollection<Orderdetail> Orderdetail { get; set; }
         [ForeignKey("Paymethodid")]
        public virtual Paymethod Paymethod { get; set; }
        [ForeignKey("SendType")]
         public virtual DeliveType DeliveType { get; set; }
         } 
} 
